\documentclass[a4paper,12pt]{article}
\usepackage{fullpage}
\usepackage[british]{babel}
\usepackage[latin1]{inputenc}

\usepackage[boxed]{algorithm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm} \newtheorem{theorem}{Theorem}
\usepackage{color}
\usepackage{float}
\usepackage{graphicx}
\usepackage{grffile} % allows spaces in filenames
\usepackage{rotating}
\usepackage{tikz} \usetikzlibrary{trees}
\usepackage{hyperref} % should always be the last package
\hypersetup{colorlinks=true,urlcolor=blue}


\title{PcShop 2011 User Guide \\
    Software Architucture With Java Course \\ Uppsala University \\
    Spring Semester 2011} % replace n by 1, 2, or 3

\author{  Amin Khorsandiaghai [820125-3278]\and Soode Gholamzadeh [830322-7204]} % replace by your name(s)

%\date{Month Day, Year}
\date{\today}

\begin{document}

\maketitle

This Text is a step-by-step guide for the users of the pcshop online application.
 

\section*{Installation}

\subsection*{Deployment}

To deploy the application you need to have appache tomcat installed on your system.
Put the pcShop2011.war file into the webapps directory of your tomcat installation forlder.
By Starting the tomcat the project will be automatically deployed into the tomcat container.
The next step is to change the tomcat server.xml descriptor file to force it to use the JDBC Realm instead of defualt relam.
To do so you need to copy the lines from the file context.xml under the folder web/META-INF to the server.xml file of the tomcat config folder.
Or you can use the file server.xml in the folder web/META-INF and replace the tomcat sercer.xml file with this one!
The next step is to setup the database needed for the application.



\subsection*{DataBase Installation}

You must have mysql server installed on your system with the user name {\bf root} and password {\bf sesame}.
To setup the database required by the application you should run the script {\it setup.sh} which resides under the folder web/dbSql 
and when prompted for password you enter {\bf sesame} as password.
If you dont have the Connector/J Api on your java path you should copy the file {\it mysql-connector-java-5.1.16-bin.jar} from folder
web/WEB-INF/lib to your tomcat library folder.
Now you are ready to use the application.


\section*{Start}

To start the application first you need to run your tomcat container.
Then open your browser and type in the address bar the following address:

{\it http://localhost:tomcat port/pcShop2011}}



\section*{Main Menu}

Under the left panel you can find main sections of the application which are as followe:

\begin{itemize}

\item Home

\item List of Products

\item Edit Your Profile

\item Contact Customer Service

\item Admin Application

\end{itemize}




\section*{Home}

This is the homr page of the application which shows the user a welcome page. 



\section*{List of Products}

In this sub section you can choose the product that you will buy. Pc or Laptop computer.
Currently this is only valid to shop a pc from this site!


\subsection*{Product List}

By clicking on the Pc icon you reach to this page which shows you a list of products that are offered currently  
by the shop. The amount column shows the quantity of each product currently available by the shop.You can buy an availbale
number of one or more than one products. Clicking the select button will add the quantity of each product into the 
shopping cart.Then to go on with shopping process you need to use the {\bf Checkout } link of the shopping cart.
Then you will forward to the log-in page that will ask you for your user name and password. If you are a new user
you should register yourself in the shop by following the {\it registerhere} link. Otherwise Enter your user name 
and password to lig in to the site to continue shopping process.
After logging in to the site your profile will be shown beside your shopping cart. you can edit your profile data.
And then click on the Buy button.Then you will be directed to the {\it Thank You} page.Then by Clicking
on the {\it by more product} you will be directed to the Product list page to buy more project.
The shopped quantities has been removed from the product list.
In this page there is also a link with name {\it Detail} which will show you the list of components of each product.
 

\section*{Edit Your Profile}
Using this part you can edit your profile information (in case you are a registered user in the system!).
You will be asked to enter your user name and password then you will reach to the update profile page.
Here you see your current profile information which you can change. You can also change your roles in the system.
If you are a user with admin role all of roles will be shown to you.Other wise just the tomcat and manager role will 
be shown to you. (Security purpose!)
Click on Go to save your changes.

\section*{Contact Customer Service}

In this section you can contact the site customer service and give your feed back or ask your questions and so on.
You must enter the necessary fields which are marked with astrics.
And then click on submit button.



\section*{Administrator Area}

This part is the Admin section of the application, which is designed to support the administrative tasks on the
web site such as adding new product and ordering new components.
to enter this area you need to be a member of admin users and have a valid user name and password.




\subsection*{Welcome to Admin Page}

In this page you have two optins available.

\begin{itemize}

\item Go to the Components Page

\item Add new products!

\end{itemize}




\subsection*{Go to the Components Page}

Choosing this option will show you the list of all components available in the shop.
(This set is predefined which means that you cannot add new component in the shop)
Then you can order amount of component in this section.The effect will be added in the database.


\subsection*{Add New Product Page}
In this part you will see a list of current product available in the shop. And you can also add a new product by
clicking on the {\it Add New Product} button.




\subsection*{Please Enter The New Product}

In this page you need to enter the properties of the new product which you are going to add to the shop.
You should fill all the field with appropriate data. Then click on the Submit button to add the new product
to the shop.



\end{document}